package com.weixin.service;

import java.sql.SQLException;
import java.util.List;


import com.weixin.entity.User_Tb;

public interface User_TbService {
	/**
	 * 查询所有数据
	 * @return
	 * @throws SQLException
	 */
     public List<User_Tb> getAll()throws SQLException;
     
     public boolean add(User_Tb user_tb) throws SQLException;
     
     public boolean deleteById(int id) throws SQLException;
     
     public boolean deleteAll(List<String> ids)throws SQLException;
     
     public boolean updateSelect(User_Tb user_tb)throws SQLException;
     
     public User_Tb getById(int id)throws SQLException;
     
     public User_Tb selectmp(String name,String password) throws SQLException;
     
     public List<User_Tb> listByRole(String role) throws SQLException;
     
     public List<User_Tb> listAllByRolePagination(String role, int pageSize, int pageNum) throws SQLException ;

	/**
	 * 查找某个角色的总条数
	 * @param role
	 * @return
	 * @throws SQLException
	 */
	public int getTotal(String role)throws SQLException;
	
	
	/**
	 * 通过角色名和关键字查找对应的用户，然后分页
	 * @param role
	 * @param search
	 * @param pageSize
	 * @param pageNum
	 * @return
	 * @throws SQLException
	 */
	public List<User_Tb> selectAllByRoleSearchPagination(String role,String search,int pageSize,int pageNum)throws SQLException;

	public List<User_Tb> listAllByRoleSearchPagination(String role, String search, int pageSize, int pageNum)throws SQLException;

	public double getTotalBySearch(String role, String search)throws SQLException;

	public User_Tb xiugai(String name)throws SQLException;
     
	public User_Tb yz(String question1, String answer1,String question2,String answer2,String name)throws SQLException;
      
	public boolean pwdnew(User_Tb user_tb) throws SQLException; 
     
}
